Market requirements, environmental needs, and business costs dictate that computing devices use as little energy as possible while still providing robust computing services. The energy consumed by a computing device can be more efficiently managed by providing enough computational power for each service as needed instead of providing maximum computational power at all times. Computing devices provide services by executing computer program instructions. Computer program instructions are executed by electronic circuitry in computing devices such as laptop, desktop, and mainframe computers, personal digital assistants (PDAs), cellular telephones, etc. The electronic circuitry that executes computer program instructions in a computing device is often contained in a single integrated circuit referred to as a “core.” A core is contained in a single physical package often referred to as a “microprocessor” or simply a “processor.” Multiple interacting cores may be contained in a single processor.
Most computing devices execute a computer program, referred to as an operating system, that guides the operation of the computing device and provide services to other programs executed by the computing device. Specifically, an operating system controls the allocation and usage of hardware resources such as memory, computing resources, mass memory storage, peripheral devices, etc. The computer instructions essential to initializing and operating the computing device are contained in a component of the operating system often referred to as the “kernel.” Shortly after a computing device is started, the kernel begins executing. Because a kernel has direct control of the hardware and has access to current data about the rest of the operating system, a kernel is the ideal software component for regulating computing power and, thus, controlling energy consumption.
A kernel communicates with a processor via a software component referred to as a processor driver. In many operating systems, a processor driver is used to abstract the differences between various processors, and allow the kernel to control a processor's power management features. These power management features may include the ability of the system to adjust the processor's voltage and frequency. Increasing the processor's voltage and/or frequency increases the speed at which the instructions are executed by the processor and increase the power consumption of the processor. Decreasing the processor's voltage and/or frequency decreases the speed at which instructions are executed by the processor and decreases the power consumption of the processor. Controlling a processor's voltage and frequency in order to control instruction execution speed and power consumption is defined in the ACPI specification as a processor performance state. Computing devices containing multiple processors and processors containing multiple cores must often cope with power management dependencies between the processors and cores. For example, in a processor containing-multiple cores, it may be that reducing the voltage of one core requires reducing the voltage of all of the cores.
The power management capabilities and software interface used to invoke power management features varies depending on the processor type. This variation, in the past, has required that a kernel have access to a plurality of processor drivers, one processor driver for each processor type. Preferably, systems with processor power management features conform to the Advanced Configuration and Power Interface (ACPI) specification. ACPI specifies how operating systems may discover the configuration of electronic circuitry, e.g., processors, in computing devices and manage the power usage of computing devices and systems. ACPI defines hardware and software interfaces that enable operating systems to control performance characteristics of computing devices such as processing speed, power consumption, and respond to the system's temperature, etc. ACPI software interfaces are provided by data structures called “software objects.” A “software object”, i.e., an object, is a data structure that contains data and may or may not also contain functions, or references to functions, that operate on the data contained in the object.